package com.limf.demo.finallyDemo;

public class FinallyTest {

	public static void main(String[] args) {
		//System.out.println(test());
		System.out.println(test2());
	}
	
	static int test() {
		try {
			return 1;
		}finally {
			return 2;
		}
	}
	static int test2() {
		int i=1;
		try {
			System.out.println("try语句块中");
			return 1;
		}finally {
			System.out.println("finally语句块中");
			return 2;
		}
	}
}
